:root {
  --vi-bg: white;
  --vi-fg-deep: @gray-darker;
  --vi-fg: @gray-dark;
  --vi-fg-muted: @gray-light;
  --vi-fg-accent: black;
  --vi-fg-accent-hsl: 0, 0%, 0%;
  --vi-font-1: "BookmanOldStyle", STSong, "Microsoft YaHei", SimSun, MingLiU, "宋体", serif;
  --vi-font-2: "BookmanOldStyle", "微软雅黑", "Microsoft YaHei", serif;
  --vi-font-mono: "Inter", ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  --vi-gap-1: .25rem;
  --vi-gap-2: .5rem;
  --vi-gap-md: 1.25rem;
  --vi-gap-lg: 1.5rem;
}

html.dark {
  color-scheme: dark;

  --vi-bg: #212121;
  --vi-fg-deep: hsla(0, 0%, 100%, 0.88);
  --vi-fg: hsla(0, 0%, 100%, 0.8);
  --vi-fg-muted: hsla(0, 0%, 100%, 0.6);
  --vi-fg-accent: white;
  --vi-fg-accent-hsl: 0, 0%, 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  font-family: var(--vi-font-1);
  /*font-family: var(--vi-font-2);*/
  line-height: 1.42857143;
  color: var(--vi-fg);
  background-color: var(--vi-bg);
  transition: background-color .5s;
}

a {
  color: inherit;
  white-space: nowrap;

  &:hover {
    color: #31708f;
  }

  &:not(.icon) {
    border-bottom: 1px dashed hsla(var(--vi-fg-accent-hsl), .3);
  }
}

code {
  color: var(--vi-fg-deep);
  font-family: var(--vi-font-mono);
  font-weight: 600;
  font-size: .875em;

  &:before,
  &:after {
    content: "`";
  }
}

.container {
  --gap: 15px;
  padding-right: var(--gap);
  padding-left: var(--gap);
  margin-right: auto;
  margin-left: auto;

  @media (min-width: 768px) {
    width: 750px;
  }

  @media (min-width: 992px) {
    width: 970px;
  }

  @media (min-width: 1200px) {
    width: 1170px;
  }

  @media (min-width: @desktop) {
    display: grid;
    grid-template-columns: 15fr 50fr;
  }

  .row {
    margin-right: ~'calc(var(--gap) * -1)';
    margin-left: ~'calc(var(--gap) * -1)';
  }
}

.card {
  padding: 1.25rem;

  @media (min-width: @desktop) {
    padding: 3em 3.5em;
  }
}

.card-nested {
  padding: .5rem 0;

  @media (min-width: @desktop) {
    padding-left: 1rem;

    li& .highlight{
      padding-left: 2rem;
    }
  }
}

.name-and-job {
  .name {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 28px;
  }

  .job {
    margin-bottom: .5em;
  }

  .contact {
    display: block;
    line-height: 2;
    font-size: .8em;
  }

  html.dark & > * {
    filter: drop-shadow(2px 2px 6px #fff);
  }

  @media (max-width: @desktop) {
    text-align: center;
  }
}

.prose {
  p {
    line-height: 1.8;
    margin-bottom: 1em;

    &:last-child {
      margin-bottom: 0;
    }
  }
}

.page {
  font-size: .875rem;

  h4 {
    font-size: 1rem;

    &:not(:first-child) {
      margin-top: 1.5em;
    }

    .title {
      position: relative;
      display: inline-flex;
      align-items: center;
      height: 28px;
      padding-left: 1rem;
      padding-right: 25px;
      color: #fff;
      font-size: inherit;
      font-weight: 600;

      > span {
        position: relative;
        z-index: 1;
        line-height: 1;
      }

      &:before,
      &:after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        height: 0;
        border-right: 6px solid transparent;
      }

      &:before {
        width: ~'calc(100% + 12px)';
        border-bottom: 23px solid hsla(0, 0%, 0%, .12);
      }

      &:after {
        width: 100%;
        border-bottom: 28px solid hsla(0, 0%, 0%, 1);
      }

      html.dark &:before {
        border-bottom-color: hsla(0, 0%, 0%, .22);
      }
    }
  }

  .description {
    line-height: 1.6;

    &.project {
      margin-top: 4px;
    }
  }

  .highlight {
    padding-left: 1rem;

    li {
      list-style: square;

      &:not(:first-child) {
        margin-top: .25rem;
      }
    }
  }

  .skill-table {
    display: grid;
    grid-template-columns: max-content auto;
    grid-gap: 1rem .75rem;

    .name {
      font-weight: bold;
      text-align: right;
    }
  }

  .labels {
    word-spacing: 5px;
    line-height: 2;
  }

  .label-keyword {
    display: inline-block;
    background: @theme-label-bg;
    color: white;
    font-size: .9em;
    padding: 5px;
    border: 1px solid @theme-label-border-color;
  }

  .enumeration:not(:last-child):after {
    content: "，";
  }

  .enumeration:last-child:after {
    content: " ";
  }
}
